#include<stdio.h>
#include<unistd.h>
int main()
{
 char  processbar[101]={'\0'};
 char  reserve[4]={'|','/','-','\\'};
  for(int i=0;i<100;i++)
  {
    
    processbar[i]='*';
    if(i<99)
    {
      processbar[i+1]='>';
    }
    printf("[%-100s][%d%%][%c]\r",processbar,i+1,reserve[i%4]);
    
    fflush(stdout);
    usleep(100000);
  }
  printf("\n");
  return 0;
}
